package com.appleyk.mybatis;

import com.appleyk.mybatis.model.User;
import com.appleyk.mybatis.v1.config.MapperConfigV1;
import com.appleyk.mybatis.v1.mapper.UserMapper;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * <p>越努力，越幸运</p>
 * 测试类
 * @author appleyk
 * @version V.0.1.1
 * @blob https://blog.csdn.net/appleyk
 * @date created on  11:25 下午 2020/12/11
 */
public class MapperApplication {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(MapperConfigV1.class);
        UserMapper bean = context.getBean(UserMapper.class);
        User user = bean.findById(1001L);
        System.out.println("=== 我查询到了用户，信息是："+user);
    }
}
